import React, {Component} from 'react';
import axios from 'axios'
import Tuikuan from "../../components/dingdan/tuikuan";
import {queryRefundOrder} from '../../utils/api'

class Tuikuandingdan extends Component {
    constructor() {
        super();
        this.state={
            data:'暂无数据'
        }
    }
    componentDidMount(){
        axios({
            url:queryRefundOrder,
            method:'get',
            params:{}
        }).then(data=>{
            console.log(data)
            if (data.data.code===200){
                this.setState({
                    data:data.data.data
                })
            }else {
                this.setState({
                    data:'暂无数据'
                })
            }
        })
    }
    render() {
        const tuikuangxuanran=<Tuikuan data={this.state.data}/>
        return (
            <div>
                {tuikuangxuanran}
            </div>
        );
    }
}

export default Tuikuandingdan;